const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
          // 微信小程序兼容变量
          $rpx-conversion: 1;
        `
      }
    }
  },
  pluginOptions: {
    'uni-app': {
      // 微信小程序专用配置
      mpWeixin: {
        appid: 'wx48a404d759cdfa92',
        setting: {
          urlCheck: false,
          es6: true,
          minified: true,
          postcss: {
            autoprefixer: {
              enable: true,
              config: {
                // 微信小程序兼容前缀
                browsers: ['Chrome >= 53', 'Firefox >= 48', 'Safari >= 9', 'iOS >= 9']
              }
            }
          }
        }
      }
    }
  }
})